package com.ruoyi.hyg.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 搜索结果对象
 * 
 * @author hyg
 * @date 2025-01-XX
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SearchResult extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 题库ID */
    private Long questionBankId;

    /** 题库名称 */
    @Excel(name = "题库名称")
    private String title;

    /** 题库描述 */
    @Excel(name = "题库描述")
    private String description;

    /** 科目名称 */
    @Excel(name = "科目名称")
    private String subjectName;

    /** 难度等级 */
    @Excel(name = "难度等级")
    private String difficultyLevel;

    /** 题目数量 */
    @Excel(name = "题目数量")
    private Integer questionCount;

    /** 封面图片 */
    @Excel(name = "封面图片")
    private String coverImage;

    /** 价格 */
    @Excel(name = "价格")
    private Double price;

    /** 是否免费 */
    @Excel(name = "是否免费")
    private Boolean isFree;

    /** 相关度分数 */
    private Double relevanceScore;
	
	@Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("questionBankId", getQuestionBankId())
            .append("title", getTitle())
            .append("description", getDescription())
            .append("subjectName", getSubjectName())
            .append("difficultyLevel", getDifficultyLevel())
            .append("questionCount", getQuestionCount())
            .append("coverImage", getCoverImage())
            .append("price", getPrice())
            .append("isFree", getIsFree())
            .append("relevanceScore", getRelevanceScore())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
